# -*- coding: utf-8 -*-
# @Time : 2021/9/9 15:09
# @Author : 伟哥
# @Email : xw@gmail.com
# @File : test_shangji.py
# @Project : crm
'''搜索我负责的'''

from time import sleep
from selenium.webdriver.common.by import By
from selenium import webdriver
from utils.get_cookie import cookie
from utils import util

#定位器
wofzd_locator=(By.LINK_TEXT,"我负责的")

#前提条件
cookie=cookie(util.HOST,util.name,util.password)
driver=webdriver.Chrome()
driver.add_cookie(cookie)
driver.get('http://192.168.1.155/crm/index.php?m=business')


#测试用例步骤
try:
    #点击 我负责的
    sleep(2)
    driver.find_element(*wofzd_locator).click()


except Exception as e:
    raise e
finally:
    sleep(5)
    driver.quit()